import { Form, Input, Card } from '@/components/base';
import { Typography } from "@/components/typography";
import { Flex } from "@/components/flex";

const { Text } = Typography;

export function PriceInfoForm() {
    return (
        <Card>
            <Text size={16} strong style={{ display: 'block', marginBottom: '16px' }}>
                价格信息
            </Text>

            <Flex vertical gap={16}>
                <Form.Item
                    label="零售价(元)"
                    name="retailPrice"
                    style={{ width: '100%', padding: 0 }}
                    rules={[
                        { required: true, message: '请输入零售价' },
                        { pattern: /^[0-9]+(\.[0-9]{1,2})?$/, message: '请输入有效的价格格式' }
                    ]}
                >
                    <Input type="number" placeholder="请输入零售价" />
                </Form.Item>

                <Form.Item
                    label="会员价(元)"
                    name="memberPrice"
                    style={{ width: '100%', padding: 0 }}
                    rules={[
                        { pattern: /^[0-9]+(\.[0-9]{1,2})?$/, message: '请输入有效的价格格式' }
                    ]}
                >
                    <Input type="number" placeholder="请输入会员价" />
                </Form.Item>

                <Form.Item
                    label="成本价(元)"
                    name="costPrice"
                    style={{ width: '100%', padding: 0 }}
                    rules={[
                        { pattern: /^[0-9]+(\.[0-9]{1,2})?$/, message: '请输入有效的价格格式' }
                    ]}
                >
                    <Input type="number" placeholder="请输入成本价" />
                </Form.Item>
            </Flex>

            <Form.Item
                label="赠送积分"
                name="giftPoints"
                style={{ width: '100%', padding: 0 }}
            >
                <Input type="number" placeholder="请输入赠送积分" />
            </Form.Item>
        </Card>
    );
} 